const { Article } = require('../../../model/article')

module.exports = async (req, res) => {
  // 获取id参数
  const { id } = req.params;
  // 根据id参数查询文章
  const article = await Article.findOne({ _id: id })
  res.send({
    data: article,
    meta: {
      msg: '查询成功',
      status: 200
    }
  })
}